
import React from 'react';
import PropTypes from 'prop-types';
import cs from 'classnames';
import { Input } from 'antd';
import styles from './OperationBoard.less';

const Search = Input.Search;

// 操作板
class OperationBoard extends React.Component {
  static propTypes = {
    children: PropTypes.object,
    filter: PropTypes.object,
    batchAction: PropTypes.object,
  }

  render () {
    return (
      <div className={styles.operation} >

        <div className={cs(styles.board, styles.filter)}>
          <div className={cs(styles.box, styles.leftFilter)}>
            <Search />
          </div>
          <div className={cs(styles.box, styles.right)}>
            {this.props.filter}
          </div>
        </div>

        <div className={cs(styles.board, styles.action)}>
          <div className={cs(styles.box, styles.left)}>
            {this.props.batchAction}
          </div>
          <div className={cs(styles.box, styles.right)}>
            {this.props.children}
          </div>
        </div>

      </div>
    )
  }
}

export default OperationBoard;